<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>DI_PSWEDIT</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../styles/styles.css">
<script language="javascript" src='../../links.js' type="text/javascript"></script>
</head>
<body>

<h1>DI_PSWEDIT</h1>
<div class=navbar>
<a href="../../index.html">main</a> |
<a href="../index.html">Dialog API</a> |
<a href="index.html">Dialog items</a><br>
</div>

<div class=shortdescr><dfn>DI_PSWEDIT</dfn> dialog item describes a password edit control. It is
the same as <a href="di_edit.html">DI_EDIT</a>, except the text in the <dfn>DI_PSWEDIT</dfn> is
hidden with '*' symbols.
</div>

<pre class=syntax>
struct FarDialogItem
{
  int Type          = <b>DI_PSWEDIT</b>
  int X1            = <b>X1</b>
  int Y1            = <b>Y</b>
  int X2            = <b>X2</b>
  int Y2            = <b>Y</b> (equals to Y1)
  int Focus         = <b>Focus</b>
  int Selected      = <b>0</b>
  DWORD Flags       = <b>Flags</b>
  int DefaultButton = <b>DefaultButton</b>
  char Data[512]    = <b>the text for editing</b>
};
</pre>
<p class=note><img src="../../../images/note.gif" alt="Attention!" width="10" height="10"> Attention!</p>
<UL class=note>
  <LI>This is an exemplary structure; read full description <a href="../structures/fardialogitem.html">here</a>.</LI>
</UL>

<h3>Focus</h3>
<div class=descr>
  <div class=descr>Keyboard focus flag.</div>
</div>

<h3>Flags</h3>
<div class=descr>
There are several flags applicable to the <dfn>DI_PSWEDIT</dfn>:<br>
<table class="cont">
<tr class="cont"><th class="cont" width="40%">Flag</th><th class="cont" width="60%">Description</th></tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../flags/dif_disable.html">DIF_DISABLE</a></td>
 <td class="cont" width="60%">Disables user access to the password control.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../flags/dif_readonly.html">DIF_READONLY</a></td>
 <td class="cont" width="60%">Sets read-only state for the password control.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../flags/dif_selectonentry.html">DIF_SELECTONENTRY</a></td>
 <td class="cont" width="60%">Makes the password control always select the text when it receives focus.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../flags/dif_nofocus.html">DIF_NOFOCUS</a></td>
 <td class="cont" width="60%">The dialog item cannot receive keyboard focus, but can handle other user events.</td>
 </tr>
</table>
</div>

<h3>Events</h3>
<div class=descr>
<table class="cont">
<tr class="cont"><th class="cont" width="40%">Event</th><th class="cont" width="60%">Description</th></tr>

 <tr class="cont"><td class="cont" width="40%"><a href="../dmsg/dn_drawdlgitem.html">DN_DRAWDLGITEM</a></td>
 <td class="cont" width="60%">This event is sent to the dialog callback function just before the password box is drawn.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../dmsg/dn_ctlcolordlgitem.html">DN_CTLCOLORDLGITEM</a></td>
   <td class="cont" width="60%">Plugin should pass the color attributes of the password control when this event comes. Param2 parameter:
       <pre>LoWord LoByte - color of the text
                (<a href="../../defs/farcolors.html#COL_WARNDIALOGEDIT">COL_WARNDIALOGEDIT</a> or
                 <a href="../../defs/farcolors.html#COL_DIALOGEDIT">COL_DIALOGEDIT</a>)
LoWord HiByte - color of selected text
                (<a href="../../defs/farcolors.html#COL_DIALOGEDITSELECTED">COL_DIALOGEDITSELECTED</a>)
HiWord LoByte - color of unchanged text
                (<a href="../../defs/farcolors.html#COL_DIALOGEDITUNCHANGED">COL_DIALOGEDITUNCHANGED</a>)
HiWord HiByte - 0 (not used)</pre>
 </td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../dmsg/dn_key.html">DN_KEY</a></td>
 <td class="cont" width="60%">This event comes after the user has pressed a key in the dialog.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../dmsg/dn_mouseclick.html">DN_MOUSECLICK</a></td>
 <td class="cont" width="60%">This event comes after the user has clicked one of the dialog items or outside the dialog with the mouse button.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../dmsg/dn_editchange.html">DN_EDITCHANGE</a></td>
 <td class="cont" width="60%">The text in the password field was changed.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../dmsg/dn_killfocus.html">DN_KILLFOCUS</a></td>
 <td class="cont" width="60%">This event is sent before the password control loses focus, if the flag <a href="../flags/dif_nofocus.html">DIF_NOFOCUS</a> was not used.</td>
 </tr>
 <tr class="cont"><td class="cont" width="40%"><a href="../dmsg/dn_killfocus.html">DN_GOTFOCUS</a></td>
 <td class="cont" width="60%">This event is sent after the password control receives keyboard focus,
 if the flag <a href="../flags/dif_nofocus.html">DIF_NOFOCUS</a> was not used.</td>
 </tr>

</table>
</div>

<h3>Remarks</h3>
<div class=descr>
<p>The <dfn>DI_PSWEDIT</dfn> control doesn't allow copying password text to the clipboard.</p>
</div>


<div class=see>See also:</div><div class=seecont>
<a href="di_edit.html">DI_EDIT</a>,
<a href="di_fixedit.html">DI_FIXEDIT</a>,
<a href="../structures/fardialogitem.html">FarDialogItem</a>

</div>

</body>
</html>